'''
选择排序
'''


def select_sort(list):
    n = len(list)
    for i in range(n - 1):
        min_value = i
        for j in range(i + 1, n):
            if list[j] < list[min_value]:
                min_value = j

        if min_value != i:
            list[i], list[min_value] = list[min_value], list[i]

    print(list)

if __name__ == '__main__':
    select_sort([29, 24, 25])
    # bubble_sort([22, 24, 25])
